import request from '@/utils/request'

export default{

    //1.通过课程id查询章节小节
    getChapterVideo (courseId){
        return request({
            //路径:添加参数的两种方法
            url:'/eduservice/edu-chapter/getChapterVideo/'+courseId,
            method: 'get'
        })
    },
    //2.添加章节
    addChapter (chapter){
        return request({
            //路径:添加参数的两种方法
            url:'/eduservice/edu-chapter/addChapter/',
            method: 'post',
            data:chapter
        })
    },
    //3.根据章节id查询
    getChapterInfo (chapterId){
        return request({
            //路径:添加参数的两种方法
            url:'/eduservice/edu-chapter/getChapterInfo/'+chapterId,
            method: 'get',
        })
    },  
    //4.修改章节
    updateChapter (eduChapter){
        return request({
            //路径:添加参数的两种方法
            url:'/eduservice/edu-chapter/updateChapter/',
            method: 'post',
            data:eduChapter
        })
    },
    //5.删除章节
    deleteChapter (chapterId){
        return request({
            //路径:添加参数的两种方法
            url:'/eduservice/edu-chapter/deleteChapter/'+chapterId,
            method: 'get',
        })
    },            
}